home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-ARM / SHMPARAM.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  1KB  |  48 lines

  1. #ifndef _ASMARM_SHMPARAM_H
  2. #define _ASMARM_SHMPARAM_H
  3.  
  4. /*
  5.  * Include the machine specific shm parameters before the processor
  6.  * dependent parameters so that the machine parameters can override
  7.  * the processor parameters
  8.  */
  9. #include <asm/arch/shmparam.h>
  10. #include <asm/proc/shmparam.h>
  11.  
  12. /*
  13.  * Format of a swap-entry for shared memory pages currently out in
  14.  * swap space (see also mm/swap.c).
  15.  *
  16.  * SWP_TYPE = SHM_SWP_TYPE
  17.  * SWP_OFFSET is used as follows:
  18.  *
  19.  *  bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
  20.  *  bits 7..21: index of page within shared memory segment (SHM_IDX)
  21.  *        (actually fewer bits get used since SHMMAX is so low)
  22.  */
  23.  
  24. /*
  25.  * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
  26.  * there is a static array of size SHMMNI.
  27.  */
  28. #define _SHM_ID_BITS    7
  29. #define SHM_ID_MASK    ((1<<_SHM_ID_BITS)-1)
  30.  
  31. #define SHM_IDX_SHIFT    (_SHM_ID_BITS)
  32. #define _SHM_IDX_BITS    15
  33. #define SHM_IDX_MASK    ((1<<_SHM_IDX_BITS)-1)
  34.  
  35. /*
  36.  * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
  37.  * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
  38.  */
  39.  
  40. #define SHMMIN 1 /* really PAGE_SIZE */    /* min shared seg size (bytes) */
  41. #define SHMMNI (1<<_SHM_ID_BITS)    /* max num of segs system wide */
  42. #define SHMALL                /* max shm system wide (pages) */ \
  43.     (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
  44. #define    SHMLBA PAGE_SIZE        /* attach addr a multiple of this */
  45. #define SHMSEG SHMMNI            /* max shared segs per process */
  46.  
  47. #endif /* _ASMARM_SHMPARAM_H */
  48.